# 7.8 熟食店
sandwich_orders=['BLT','Club','Reuben','Turkey']
finished_sandwiches=[]
while sandwich_orders:
    sandwich=sandwich_orders.pop()
    print(f"I made your {sandwich} sandwich.")
    finished_sandwiches.append(sandwich)
print("\nSandwiches in finished_sandwiches:")
for sandwich in finished_sandwiches:
    print(sandwich)

# 7.9 五香烟熏牛肉卖完了
sandwich_orders=['BLT','pastrami','Club','pastrami','Reuben','Turkey','pastrami']
print("The pastrami sandwich is sold out.")
while 'pastrami' in sandwich_orders:
    sandwich_orders.remove('pastrami')
print(sandwich_orders)

# 7.10 梦想中的度假胜地
resorts={}
poll_active=True
while poll_active:
    name=input('Enter your name: ')
    destination=input('If you could visit one place in the world, where would you go? ')
    resorts[name]=destination
    next=input('Do you recommend someone else?(y/n): ')
    if next!='y':
        poll_active=False
print("\nThe results are as follows:")
for name,destination in resorts.items():
    print(f"{name} wants to visit {destination}.")